//express_demo.js 文件
var express = require('express');
var app = express();
const cors = require('cors')
app.use(cors())
    // app.get('', function(req, res) {
    //     res.send('Hello World');
    // })
app.use(express.urlencoded({ extended: false }))
app.use(express.json())
app.use('/public', express.static('public'));
const userRoute = require('./router/user');
app.use('/api', userRoute)

var server = app.listen(8081, function() {

    console.log("服务器已开启")

})